﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.Extensions.Configuration;
using SDService.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SDService.Model.DTO;
namespace SDService.Common
{
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)]
    public class ApiResultFilterAttribute : ActionFilterAttribute
    { 

        public override void OnActionExecuting(ActionExecutingContext context)
        {
            base.OnActionExecuting(context);
            
        }

        public override void OnResultExecuting(ResultExecutingContext context)
        {
            //var objectResult = context.Result as ObjectResult;
            //context.Result = new OkObjectResult(new ResultResponseBase { Code= "30000", Result=objectResult.Value });
        }

    }
}
